﻿@model NewLink
@{
    
    if (null != Model.UpdateTargetId)
    {
        if (Model.RouterValues == null)
        {
            Model.RouterValues = new RouteValueDictionary();
        }
        (Model.RouterValues as RouteValueDictionary).Add("_utid", Model.UpdateTargetId);
    }
}
@Ajax.ActionLink(Model.Title, Model.Action, Model.RouterValues,
    new AjaxOptions()
    {
        LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox",
        HttpMethod = "Get",
        InsertionMode = InsertionMode.Replace,
        OnComplete = "showDialog('" + Model.DialogTitle + "',true);",
        OnFailure = "OnSiteError"
    })
